<?php
/**
 * @package me.joshua.baehelper
 */
/*
 Plugin Name: BAE Helper
 Plugin URI: http://http://home4j.duapp.com/
 Description: A helper plugin that simplify the configuration of WordPress that deploy on BAE(Baidu App Engine).
 Version: 1.0.0
 Author: Joshua Zhan
 Author URI: http://http://home4j.duapp.com/
 License: GPLv3 or later
 */

/**
 * Include the option page of BAE-Helper plugin.
 */
require_once 'bae-helper-core.php';
require_once 'bae-helper-options.php';

$settings = bae_helper_bcms_get_options();

if (1 == $settings['page-custom-head-enable']) {
	add_action('wp_head', 'bae_helper_custom_head');
}

if (1 == $settings['page-custom-footer-enable']) {
	add_action('wp_footer', 'bae_helper_custom_footer');
}

if (1 == $settings['gavatar-proxy-enable']) {
	add_filter('get_avatar', 'bae_helper_gravatar_proxy', 10, 3);
}
